package com.mcxx.modules.miniSalvation.salary.service.read;

import com.mcxx.modules.base.utils.QueryParamUtil;
import com.mcxx.modules.miniSalvation.family.dto.MiniFamilyChangeExcelDTO;
import com.mcxx.modules.miniSalvation.family.dto.MiniMemberExcelDto;
import com.mcxx.modules.miniSalvation.family.dto.SalvationObjectChangeDTO;
import com.mcxx.modules.miniSalvation.family.param.SalvationFamilyChangeParam;
import com.mcxx.modules.miniSalvation.salary.dao.read.MemberSalaryChangeReadDao;
import com.yinhai.ta404.core.restservice.requestbean.PageParam;
import com.yinhai.ta404.core.restservice.resultbean.Page;
import com.yinhai.ta404.core.security.vo.UserAccountVo;
import com.yinhai.ta404.core.transaction.annotation.TaTransactional;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


@TaTransactional(readOnly = true)
@Service("memberSalaryChangeReadService")
public class MemberSalaryChangeReadService {
    @Autowired
    private MemberSalaryChangeReadDao memberSalaryChangeReadDao;

    public Page<SalvationObjectChangeDTO> getSalvationObjectChangeList(SalvationFamilyChangeParam param, PageParam pageParam, UserAccountVo accountVo) {

        QueryParamUtil.setBaseParamValue(param,accountVo);


        memberSalaryChangeReadDao.beginPager(pageParam);
        List<SalvationObjectChangeDTO>list = memberSalaryChangeReadDao.getSalvationObjectChangeList(param);


        return  memberSalaryChangeReadDao.endPager(list);
    }


    public List<MiniMemberExcelDto> exportMiniMemberChangeList(SalvationFamilyChangeParam param){ return memberSalaryChangeReadDao.exportMiniMemberChangeList(param);}

}
